package com.noble.meether.ui.invite.detail.bean;

import com.noble.library.base.bean.BaseData;
import com.noble.library.utils.StringUtils;

import org.json.JSONObject;

/**
 * 邀请的人明细
 */
public class InviteDetail extends BaseData {
    private long uidSon;      // 邀请用户ID
    private String avatarSon; // 邀请用户头像
    private String nickNameSon;// 邀请用户昵称
    private String timeReg;     // 邀请用户注册时间

    @Override
    public void parseJson(String jsonStr) {
        JSONObject jsonObject = getJsonObject(jsonStr);

        this.setUidSon(jsonObject.optLong("UidSon"));
        this.setAvatarSon(jsonObject.optString("AvatarSon"));
        this.setNickNameSon(jsonObject.optString("NickNameSon"));
        this.setTimeReg(jsonObject.optString("TimeReg"));
    }

    public long getUidSon() {
        return uidSon;
    }

    public void setUidSon(long uidSon) {
        this.uidSon = uidSon;
    }

    public String getAvatarSon() {
        return avatarSon;
    }

    public void setAvatarSon(String avatarSon) {
        this.avatarSon = avatarSon;
    }

    public String getNickNameSon() {
        return nickNameSon;
    }

    public void setNickNameSon(String nickNameSon) {
        this.nickNameSon = nickNameSon;
    }

    public String getTimeReg() {
        return StringUtils.getCreateTime(timeReg);
    }

    public void setTimeReg(String timeReg) {
        this.timeReg = timeReg;
    }
}
